package com.snow.useviewdemo.function2.exposure;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;

/**
 * Created by zhaoyingtao
 * Date: 2020/9/4
 * Describe:
 */
public class TestRelateLayout extends RelativeLayout {
    private Context mContext;

    public TestRelateLayout(Context context) {
        super(context);
        this.mContext = context;
        initView();
    }

    public TestRelateLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.mContext = context;
        initView();
    }

    private void initView() {
        ExposureSubstitutionView substitutionView = new ExposureSubstitutionView(mContext);
        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(LayoutParams
                .MATCH_PARENT, 10);
        lp.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
        addView(substitutionView, lp);
    }
}
